NevronOpenVision
Nevron.Nov.Compression Namespace / NCompression Class / CompressZlib Method / CompressZlib(Byte[],Int32,Int32,Stream,ENCompressionLevel,Boolean) Method
An array of bytes to compress.
The index in the byte array the compression algorith should start working at.
The total number of bytes from the byte array that should be compressed.
The stream to write the compressed data to.
The compression level to apply.
Determines whether to close the output stream when the compression has finished or not.
In This Topic
    CompressZlib(Byte[],Int32,Int32,Stream,ENCompressionLevel,Boolean) Method
    In This Topic
    Compresses the given bytes with the zlib algorithm.
    Syntax
    public static void CompressZlib( 
       System.byte[] input,
       System.int startIndex,
       System.int count,
       System.IO.Stream output,
       ENCompressionLevel compressionLevel,
       System.bool closeOutputStream
    )

    Parameters

    input
    An array of bytes to compress.
    startIndex
    The index in the byte array the compression algorith should start working at.
    count
    The total number of bytes from the byte array that should be compressed.
    output
    The stream to write the compressed data to.
    compressionLevel
    The compression level to apply.
    closeOutputStream
    Determines whether to close the output stream when the compression has finished or not.
    Remarks
    The zlib algorithm is an abstraction of the deflate algorithm used by the gzip compression and has become very popular because of its great performance. It is used in many file formats such as ZIP, PNG, PDF, flash movies (SWF), etc. and is a crucial part of many platforms like Linux, Mac OS X, iOS, XBox, Playstation, Wii and so on.
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later)

    See Also